package cn.tedu.ivos2.dict.controller;

import cn.tedu.ivos2.base.response.JsonResult;
import cn.tedu.ivos2.dict.pojo.dto.DictQuery;
import cn.tedu.ivos2.dict.pojo.vo.DictVO;
import cn.tedu.ivos2.dict.service.DictService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/dict")
@Slf4j
public class DictController {
    @Autowired
    private DictService dictService;
    @GetMapping("/select")
    public JsonResult selectDict(DictQuery dictQuery){
        log.debug("查询字典列表,{}",dictQuery);
        List<DictVO> list = dictService.selectDict(dictQuery);
        return JsonResult.ok(list);
    }
}
